This invention relates generally to optical systems used in image scanners, digital copiers, facsimile machines, and similar devices and more specifically to compensation of optical aberrations after measuring, within the scanner, in near real-time, the point-spread function of the optical system.
Image scanners convert a visible image on a document or photograph, or an image in a transparent medium, into an electronic form suitable for copying, storing or processing by a computer. An image scanner may be a separate device or an image scanner may be a part of a copier, part of a facsimile machine, or part of a multipurpose device. Reflective image scanners typically have a controlled source of light, and light is reflected off the surface of a document, through an optics system, and onto an array of photosensitive devices. The photosensitive devices convert received light intensity into an electronic signal. Transparency image scanners pass light through a transparent image, for example a photographic positive slide, through an optics system, and then onto an array of photosensitive devices.
In general, image scanners use an optical lens system or optical waveguide system to focus an image onto an array of photosensors. Lens systems and optical waveguide systems are subject to various optical aberrations such as spherical aberration, coma, astigmatism, field curvature, chromatic aberration, motion blur, and stray reflections (ghosting). Aberrations may be reduced by making the optical systems more precise and more complex, which in turn typically increases cost, size and weight. There is need for overall system cost reduction and size reduction by enabling use of relatively simple and low cost optical systems.
Some known, fixed, aberrations may be removed by geometric calibration. For example, an image of a grid of dots may be used to determine spatial pixel translations for images generated by fisheye lenses. Other compensation for some types of aberrations may be determined by using a mathematical model of the lens and optical design software.
Another method for compensation of optical aberration involves linear system theory and the impulse response of the system. In optical systems, the impulse response, or the image of a bright point object against a dark background, is called the point-spread function. The two-dimensional Fourier transform of the spatial domain point-spread function is called the optical transfer function. The frequency domain optical transfer function includes magnitude and phase. A two dimensional, magnitude only, vertical slice through the optical transfer function is called the modulation transfer function. If an image is blurred by an optical system, some blurring can be removed in the frequency domain by dividing the transform of the blurred image by the optical transfer function for the same imperfect optics. Convolution in the spatial domain is equivalent to multiplication in the frequency domain. Accordingly, as an alternative, some blurring may be removed in the spatial domain by convolution with an appropriate two-dimensional kernel computed from the point-spread function. Because of aliasing, and because of possible desired trade-offs between signal-to-noise and image sharpening, the desired modulation transfer function may have a lower frequency response than an ideal modulation transfer function based on a response to a true impulse.
Typically, determination of aberrations using a mathematical model of a lens, or determination of the point-spread function, is performed as a one-time calibration for on-axis imaging. However, the point-spread function of a lens may vary with manufacturing processes, may vary over time, may vary with temperature and humidity, and may vary with the locations of the image focal plane and the object focal plane. If an optical system is substantially different than a computer model, or if the lens system changes after determination of the point-spread function, a resulting filtering operation to compensate for aberrations may further degrade the image instead of reducing image degradation.
In particular, some low cost plastic lenses are relatively sensitive to temperature. It is common for an image scanner to include a lamp that radiates substantial heat. Copiers and multi-purpose devices may also include heaters for fusing toner onto paper or for drying ink. Before scanning is requested, lamps and heaters may be off or in a low-power standby condition. During scanning, the internal temperature of the image scanner may change substantially over a period of time that is long relative to the time required to scan a single image. In addition, for compact product size, image scanning lens systems typically focus on a document that is relatively close to the lens and therefore must be accurate over a wide field of view. Some aberrations, for example, astigmatism, coma, curvature of field are spatially variant. Therefore, a single kernel determined once for on-axis viewing may not be adequate for a lens system in an image scanner.
There is a need within image scanning products for simple, low cost, rapid characterization of aberrations, and compensation for aberrations, within a completed product. In addition, there is a need to compensate for aberrations, within scanning products, that vary spatially across the field of view of the lens. In addition, there is a need to determine the required compensation before each scan to accommodate changes in temperature, humidity, and other time varying factors. Finally, there is a need to monitor aberrations during a scan and to rescan if necessary.
A goal of the present application is to characterize the imperfections of a lens system in an image scanner, and to make the measurements within the scanner in near real time, and to partially compensate for the imperfections using digital image processing. In one example embodiment, a series of two-dimensional optical targets are placed outside the document scanning area. The targets extend over the entire length of the scan line to enable compensation across the field of view of the lens system. In a variation, targets are also positioned alongside the document to enable monitoring of compensation during a scan.
Each individual target is suitable for obtaining an estimate of the optical transfer function for a small segment of the scan line. One example target has step functions in intensity (white-to-black or black-to-white) at multiple angles. Each step function is suitable for obtaining an estimate for one modulation transfer function. The aggregate of the multiple modulation transfer functions for one individual target is used to estimate the optical transfer function for the viewing angle corresponding to the spatial location of the individual target.
In an alternative embodiment, a two-dimensional known random pattern is provided for a target. Cross-correlation of a portion of the known random pattern with the scanned image of the same portion of known random pattern provides an estimate of the point-spread function for the portion of the scan line corresponding to the portion of the known random pattern.
Each individual optical transfer function is then used to compensate for optical aberrations. In one embodiment, the optical transfer function is used to compute a convolution kernel for the corresponding segment of the scan line. The scanned image pixels within each segment of the scan line are convolved with a kernel appropriate for the segment. In an alternative embodiment, an iterative solution is used to compute a compensated image.
Providing a series of targets, or a continuous random target over the width of the scan line, within the scanner, enables determination of the optical transfer function, as a function of position for an assembled lens, at the humidity and temperature appropriate for the scan. Additional targets alongside a document enable ongoing verification during a scan. As a result, a smaller, lower cost lens can be used and some image degradation can be removed from the final scanned image.